﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NewsMine.DomainObjects;

namespace NewsDiscoveryEngine
{
    [Serializable]
    public class HtmlContentSaveJob : BaseJob
    {
        public HtmlContentFromUrl HtmlContent { get; set; }

        public override bool ExecuteJob()
        {
            if (this.HtmlContent != null)
                SaveHtmlContent(HtmlContent);

            return true;
        }

        public void SaveHtmlContent(HtmlContentFromUrl htmlContent)
        {
            //todo:whenever if we want to save the htmlContent, we need to uncomment this.

            //Defaults.HtmlDocumentStore.Set(htmlContent.Url, htmlContent);
            //Defaults.HtmlDocumentStore.Close();

        }
    }
}
